package com.loong.data.model;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @Description:
 * @Author: hzp
 * @Date: 2020-12-5 9:39
 */
@Setter
@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Document(indexName = "goods_specification",type="goods_specification",replicas = 0)
public class GoodsSpecificationModel implements Serializable {

    @Id
    private Long id;
    /**
     * 规格名称id
     */
    @Field(type = FieldType.Keyword)
    private Long goodsSpecificationId;

    /**
     * 规格对应的值
     */
    @Field(type = FieldType.Auto)
    private String goodsSpecificationName;

    /**
     * 店铺id
     */
    @Field(type = FieldType.Keyword)
    private Long shopId;

    /**
     * 规格对应的值
     */
    @Field(type = FieldType.Keyword)
    private String goodsSpecificationValue;


    /**
     * 规格图片
     */
    @Field
    private String picture;
}
